package com.omega.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.omega.dao.ItemDistributedDao;
import com.omega.entity.ItemDistributed;

@Repository
public class ItemDistributedDaoImpl extends GenericDaoImpl<ItemDistributed>
		implements ItemDistributedDao {

	/**
	 * 
	 */
	public ItemDistributedDaoImpl() {
		super();
		setClazz(ItemDistributed.class);

	}

	@Override
	public void addItemDistributed(ItemDistributed itemDistributed) {
		save(itemDistributed);
	}

	@Override
	public List<ItemDistributed> loadAllItemDistributed() {
		return loadAll();
	}

	@Override
	public ItemDistributed loadById(long itemDistributedId) {
		return loadByid(itemDistributedId);
	}

	@Override
	public void updateItemDistributed(ItemDistributed itemDistributed) {
		update(itemDistributed);
	}

	@Override
	public void deleteitemDistributed(long itemDistributedId) {
		ItemDistributed entity = loadByid(itemDistributedId);
		delete(entity);

	}
}
